<?php if (Yii::app()->user->hasFlash('vacancy')): ?>

    <div class="flash-success">
        <?php echo Yii::app()->user->getFlash('vacancy'); ?>
    </div>

<?php else: ?>           
    <div id="vacancy" class="global-popup">
        <div class="global-popup__description">
            <div class="global-popup__description__inner">
                <span class="global-popup__close">
                    <span>Закрыть</span>
                </span>
                <h2 class="global-small-title">Отправка резюме</h2>

                <?php
                $form = $this->beginWidget('CActiveForm', array(
                    'id' => 'vacancy',
                    'enableClientValidation' => true,
                    'htmlOptions' => array('enctype' => 'multipart/form-data'),
                    'clientOptions' => array(
                        'validateOnSubmit' => true,
                    ),
                ));
                ?>     

                <fieldset>
                    <?php echo $form->labelEx($model, 'resume_FIO'); ?>
                    <div class="type-text row">
                        <?php echo $form->textField($model, 'resume_FIO'); ?>
                    </div>
                    <?php echo $form->error($model, 'resume_FIO'); ?>
                </fieldset>

                <fieldset>
                    <?php echo $form->labelEx($model, 'resume_phone'); ?>
                    <div class="type-text row">
                        <?php echo $form->textField($model, 'resume_phone'); ?>
                    </div>
                    <?php echo $form->error($model, 'resume_phone'); ?>
                </fieldset>

                <fieldset>
                    <?php echo $form->labelEx($model, 'resume_email'); ?>
                    <div class="type-text row">
                        <?php echo $form->textField($model, 'resume_email'); ?>
                    </div>
                    <?php echo $form->error($model, 'resume_email'); ?>
                </fieldset>

                <fieldset>
                    <?php echo $form->labelEx($model, 'resume_file'); ?>
                    <div class="type-text row">
                        <?php echo CHtml::activeFileField($model, 'resume_file'); ?>
                    </div>
                    <?php echo $form->error($model, 'resume_file'); ?>
                </fieldset>

                <fieldset>
                    <?= CHtml::submitButton('Отправить', array('class' => 'type-submit-bt')) ?>
                </fieldset>
                <?php $this->endWidget(); ?>
            </div>
        </div>
        <div class="global-popup__popup-overlay">&nbsp;</div>
    </div>
<?php endif; ?>